package com.cqs.learning.spring.cloud.app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.loadbalancer.config.BlockingLoadBalancerClientAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.SpringServletContainerInitializer;


/**
 * Created by li on 20-2-29.
 */
@EnableDiscoveryClient
@EnableFeignClients
/**
 * exclude = {BlockingLoadBalancerClientAutoConfiguration.class}删除默认的负载BlockingLoadBalancerClient
 * 通过LoadBalancerAutoConfigurations实现使用RibbonLoadBalancerClient
 */
@SpringBootApplication(exclude = {BlockingLoadBalancerClientAutoConfiguration.class})
public class ConsumerApplication extends SpringServletContainerInitializer {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(ConsumerApplication.class);
        application.run(args);
    }

}
